<template>
	<view class="page-body">
		<view class="icon">
			<image src="/static/img/success.png"></image>
		</view>
		<view class="tis">
			购买成功
		</view>
		<view class="pay-amount">商品{{orderName}}已成功下单</view>
		<view class="pay-amount">您已经成功支付此笔订单，我们会尽快安排发货</view>
		<view class="back btn-row flex">
			<view class="btn btn-l" @click="goHome">再次购买</view>
			<view class="btn btn-r" @click="goOrder">查看订单记录</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				amount:0,
				orderName:""
			};
		},
		onLoad(e) {
			// this.amount = parseFloat(e.amount).toFixed(2);
			this.orderName = e.orderName
		},
		methods: {
			goHome(){
				uni.switchTab({
					url:"/pages/tabBar/home/home"
				})
			},
			goOrder(){
				uni.navigateTo({
					url:"/pages/user/order_list/order_list?tbIndex=1"
				})
			},
			toUser() {
				uni.switchTab({
					url: '/pages/tabBar/user/user'
				});
			}
		},
	}
</script>

<style lang="scss">
.page-body{text-align: center;}
.icon{
	width: 100%;
	margin-top: 30vw;
	image{
		width: 25vw;
		height: 25vw;
	}
}
.tis{
	width: 100%;
	margin-top: 20upx;
	margin-bottom: 20upx;
	font-size: 48upx;
}
.pay-amount{
	width: 100%;
	font-size: 28upx;
	line-height: 50upx;
}

.back{
	width:100%;
	margin-top:60upx;
	.btn{
		width: 280upx;
		margin: 0 auto;
		text-align: center;
		height: 70upx;
		line-height: 70upx;
		border: solid 2upx #f23d3d;
		color: #f23d3d;
		border-radius: 10upx;
		font-size: 30upx;
	}
	.btn-r{background:#f23d3d;color: #fff;}
}
</style>
